#ifndef DBCODE_H
#define DBCODE_H
#include "Type.h"
#include <map>

class DbCode
{
public:
	~DbCode();
	static DbCode& Instance(){
		static DbCode _instance;
		return _instance;
	}
	static bool Run(class Xml& conf);
	char* GetAvailableTypeName(uint type);
	char* GetAllTypeName(uint type);
	int  GetAvailableTypeId(uint type);

	uint AddTypeName(char* buff, char* name, uint id, bool isSinged);
	uint AddTypeInit(char* buff, char* name, uint id, bool isSinged);
private:
	DbCode();
	std::map<uint, char*> m_availableTypeNameMap;
	std::map<uint, char*> m_allTypeNameMap;
	std::map<uint, uint> m_availabletypeEnumMap;
};

#endif